﻿using System.Collections.Generic;
using System.ServiceModel;
using Pku.BookStore.Model;

namespace Pku.BookStore.IServices
{
    [ServiceContract(Name = "IOrderFormServices", Namespace = "Pku.BookStore.IServices")]
    public interface IOrderFormServices
    {
        /// <summary>
        /// 增加订单
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Add")]
        int Add(OrderFormModel entity);

        /// <summary>
        /// 修改订单
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Modify")]
        bool Modify(OrderFormModel entity);

        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        [OperationContract(Name = "Search")]
        List<OrderFormModel> Search(OrderFormParam param);

        /// <summary>
        /// 获取总数
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetCount")]
        int GetCount(Model.OrderFormParam param);

        /// <summary>
        /// 获取订单实体
        /// </summary>
        /// <param name="orderID"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetEntityById")]
        OrderFormModel GetEntityById(int orderID);

        /// <summary>
        /// 修改订单状态
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "ModifyStatus")]
        bool ModifyStatus(OrderFormModel entity);

        /// <summary>
        /// 修改订单状态
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "ModifyStatus")]
        bool ModifyStatus(OrderFormModel entity, int UserID);

    }
}
